package utils

import (
	"context"
	"time"
)

type Runtime time.Time

type RuntimeKey struct {
}

func WithExtraRuntime(ctx context.Context, runtime Runtime) context.Context {
	return context.WithValue(ctx, RuntimeKey{}, runtime)
}

func ExtraRuntime(ctx context.Context) (Runtime, bool) {
	r, ok := ctx.Value(RuntimeKey{}).(Runtime)
	return r, ok
}
